Conversation
object-client/src/main/java/software/amazon/s3/analyticsaccelerator/S3SdkObjectClient.java
Outdated
Show resolved
Hide resolved
common/src/main/java/software/amazon/s3/analyticsaccelerator/request/EncryptionSecrets.java
Outdated
Show resolved
Hide resolved
input-stream/src/testFixtures/java/software/amazon/s3/analyticsaccelerator/access/S3Object.java
Outdated
Show resolved
Hide resolved
common/src/main/java/software/amazon/s3/analyticsaccelerator/request/EncryptionSecrets.java
Show resolved
Hide resolved
.../integrationTest/java/software/amazon/s3/analyticsaccelerator/access/SSECEncryptionTest.java
Outdated
Show resolved
Hide resolved
common/src/main/java/software/amazon/s3/analyticsaccelerator/request/EncryptionSecrets.java
Show resolved
Hide resolved
...on/src/test/java/software/amazon/s3/analyticsaccelerator/util/OpenStreamInformationTest.java
Show resolved
Hide resolved
ahmarsuhail
left a comment
There was a problem hiding this comment.
thanks, mostly looks good, have some minor comments
...on/src/test/java/software/amazon/s3/analyticsaccelerator/util/OpenStreamInformationTest.java
Show resolved
Hide resolved
...integrationTest/java/software/amazon/s3/analyticsaccelerator/access/IntegrationTestBase.java
Outdated
Show resolved
Hide resolved
...tFixtures/java/software/amazon/s3/analyticsaccelerator/access/S3AsyncClientStreamReader.java
Outdated
Show resolved
Hide resolved
.../integrationTest/java/software/amazon/s3/analyticsaccelerator/access/SSECEncryptionTest.java
Outdated
Show resolved
Hide resolved
fuatbasik
left a comment
There was a problem hiding this comment.
@rajdchak thanks a lot for your PR. I put few comments. I have 2 big one concerns we need to re-do.
1/ Please do not share SSE-C key value in plain-text. We can get them from an environment variable but we shouldn't get share them here like this. I think the way it should work is if ENV_VAR has SSE-C not set, it should skip these tests othewise execute them.
2/ Your change breaks integration tests data generation logic today, the tests will fail if a new developer just follows the DEVELOPMENT.MD. Please make sure you are not failing this steps when updating integration tests.
3/ Could you please add examples to README on how to enable SSE-C and how to use it.
.../integrationTest/java/software/amazon/s3/analyticsaccelerator/access/SSECEncryptionTest.java
Outdated
Show resolved
Hide resolved
|
|
||
| static Stream<Arguments> encryptedParquetReads() { | ||
| List<S3Object> readEncryptedObjects = new ArrayList<>(); | ||
| readEncryptedObjects.add(S3Object.RANDOM_SSEC_ENCRYPTED_PARQUET_1MB); |
There was a problem hiding this comment.
how these two objects are generated and uploaded to S3 bucket?
...on/src/test/java/software/amazon/s3/analyticsaccelerator/util/OpenStreamInformationTest.java
Outdated
Show resolved
Hide resolved
input-stream/src/testFixtures/java/software/amazon/s3/analyticsaccelerator/access/S3Object.java
Outdated
Show resolved
Hide resolved
.../integrationTest/java/software/amazon/s3/analyticsaccelerator/access/SSECEncryptionTest.java
Outdated
Show resolved
Hide resolved
.../integrationTest/java/software/amazon/s3/analyticsaccelerator/access/SSECEncryptionTest.java
Show resolved
Hide resolved
ahmarsuhail
left a comment
There was a problem hiding this comment.
Thanks @rajdchak , looks good to me overall.
Same question as @fuatbasik, I'm not familiar with how we do data generation for files we use for our ITests. have we updated that logic so it's possible to create these new files?
ahmarsuhail
left a comment
There was a problem hiding this comment.
+1, LGTM.
test file generation to be addressed in a follow up.
| S3AsyncClient s3Client = this.getS3ExecutionContext().getS3Client(); | ||
| S3SeekableInputStream stream = s3AALClientStreamReader.createReadStream(s3Object); | ||
| S3SeekableInputStream stream = | ||
| s3AALClientStreamReader.createReadStream(s3Object, OpenStreamInformation.DEFAULT); |
There was a problem hiding this comment.
you could've saved yourself lots of time keeping createReadStream(s3Object) method around and inside call createReadStream(s3Object, OpenStreamInformation.DEFAULT).
There was a problem hiding this comment.
This is a nit btw but probably a better way to implement this pattern.
| * @param checksum optional checksum, to update | ||
| * @param openStreamInformation contains the open stream information | ||
| */ | ||
| public abstract void readPattern( |
There was a problem hiding this comment.
nit: do we want to change existing method signature or add a new method?
object-client/src/main/java/software/amazon/s3/analyticsaccelerator/S3SdkObjectClient.java
Show resolved
Hide resolved
## Description of change <!-- Thank you for submitting a pull request!--> <!-- Please describe your contribution here. What and why? --> <!-- Please ensure your commit messages follow these [guidelines](https://chris.beams.io/posts/git-commit/). --> Support passing of sse_c customer key to pass this to s3 for encryption/decryption. S3A currently has this customer key as Optional String https://github.com/apache/hadoop/blob/trunk/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/auth/delegation/EncryptionSecretOperations.java#L41 while Iceberg has this key as a String https://github.com/apache/iceberg/blob/f9cc62eb0d98e360b452a3ab8fdc6efdc4969f6e/aws/src/main/java/org/apache/iceberg/aws/s3/S3FileIOProperties.java#L499. So decided to accept this key as Optional String. #### Relevant issues <!-- Please add issue numbers. --> <!-- Please also link them to this PR. --> #### Does this contribution introduce any breaking changes to the existing APIs or behaviors? <!-- Please explain why this was necessary. --> #### Does this contribution introduce any new public APIs or behaviors? <!-- Please describe them and explain what scenarios they target. --> #### How was the contribution tested? <!-- Please describe how this contribution was tested. --> #### Does this contribution need a changelog entry? - [ ] I have updated the CHANGELOG or README if appropriate --- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I agree to the terms of the [Developer Certificate of Origin (DCO)](https://developercertificate.org/).
Description of change
Support passing of sse_c customer key to pass this to s3 for encryption/decryption.
S3A currently has this customer key as Optional String https://github.com/apache/hadoop/blob/trunk/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/auth/delegation/EncryptionSecretOperations.java#L41 while Iceberg has this key as a String https://github.com/apache/iceberg/blob/f9cc62eb0d98e360b452a3ab8fdc6efdc4969f6e/aws/src/main/java/org/apache/iceberg/aws/s3/S3FileIOProperties.java#L499. So decided to accept this key as Optional String.
Relevant issues
Does this contribution introduce any breaking changes to the existing APIs or behaviors?
Does this contribution introduce any new public APIs or behaviors?
How was the contribution tested?
Does this contribution need a changelog entry?
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I agree to the terms of the Developer Certificate of Origin (DCO).